#include "matrixThread.h"

Matrix* _A;
Matrix* _B;
Matrix* _C;

MatrixThread::MatrixThread(Matrix* A, Matrix* B, Matrix* C, int i, int j, int k)
{
  _A = A;
  _B = B;
  _C = C;

  _i = i;
  _j = j;
  _k = k;

  _result = 0;
}

void MatrixThread::run()
{
  _result =  _C->get(_i, _j) + (_A->get(_i, _k)) * (_B->get(_k, _j));
}

int MatrixThread::getResult()
{
  return _result;
}
